package me.spring.cloud.common.components.response.code;

import me.spring.cloud.common.components.util.enums.CodedEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 错误编码，业务方应继承此类，扩展其他的异常
 *
 * @author Michael
 */
@AllArgsConstructor
@Getter
public enum ErrorCode implements CodedEnum<Integer> {
  OK(1, "成功"),
  FAIL(-1, "服务异常，请稍后重试"),
  SERVER_ERROR(500, "服务内部运行异常！"),
  ;

  private Integer code;
  private String desc;
}
